package com.jysz.certificate.persistence.model.system;


import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.jysz.webcore.ssh.entity.AbstractBaseEntity;

/**
 * 角色-权限
 * @author <a href="mailto:javaengine@outlook.com">Kaca Rich</a>
 *
 */
@Entity
@Table(name="sys_role_oper_ref")
@org.hibernate.annotations.Entity(dynamicInsert=true,dynamicUpdate=true)
public class RoleOperRef extends AbstractBaseEntity<Long> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Role role;
	
	private Oper oper;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="role_id", columnDefinition="bigint(20)")
	public Role getRole() {
		return role;
	}
	public void setRole(Role role) {
		this.role = role;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="oper_id", columnDefinition="bigint(20)")
	public Oper getOper() {
		return oper;
	}
	public void setOper(Oper oper) {
		this.oper = oper;
	}
}
